# -- coding: utf-8 --

# TODO: 完善框选

# 普通发票内容区域
GENERAL_RECEIPT_RECTS = {
    "number": (
        481,
        31,
        572,
        41,
    ),
    "date": (
        481,
        49,
        545,
        59,
    ),
    "buyer_name": (
        56,
        95,
        293,
        105,
    ),
    "buyer_id": (
        153,
        123,
        293,
        137,
    ),
    "seller_name": (
        340,
        95,
        576,
        105,
    ),
    "seller_id": (
        437,
        123,
        576,
        138,
    ),
    "total": (
        397,
        259,
        583,
        272,
    ),
    "total_tax": (
        397,
        259,
        583,
        272,
    ),
    "total_big": (
        178,
        276,
        486,
        290,
    ),
    "total_num": (
        178,
        276,
        486,
        290,
    ),
    "handler_name": (
        90,
        368,
        157,
        378,
    ),
    "item_name": (
        12,
        160,
        583,
        170,
    ),
    "item_tax_rate": (
        12,
        160,
        583,
        170,
    ),
    "item_price": (
        12,
        160,
        583,
        170,
    ),
    "item_tax": (
        12,
        160,
        583,
        170,
    ),
    "remark": (32, 297, 581, 350),
}

# 增值税发票内容区域
VAT_RECEIPT_RECTS = {
    "code": (475, 12, 545, 22),
    "number": (475, 30, 545, 40),
    "date": (477, 46, 542, 58),
    "check": (475, 65, 574, 75),
    "password": (
        370,
        86,
        588,
        144,
    ),
    "machine_code": (75, 64, 125, 74),
    "buyer_name": (108, 87, 340, 113),
    "buyer_id": (108, 87, 340, 113),
    "buyer_address": (108, 87, 340, 113), # TODO: 扩展买方地址方框
    "buyer_account": (0, 0, 1, 1),  # TODO: 添加买方账号方框
    "seller_name": (106, 295, 340, 332),
    "seller_id": (106, 295, 340, 332),
    "seller_address": (106, 295, 340, 332),
    "seller_account": (106, 337, 340, 345),
    "total": (190, 259, 590, 287),
    "total_tax": (190, 259, 590, 287),
    "total_big": (190, 259, 590, 287),
    "total_num": (190, 259, 590, 287),
    "payee_name": (65, 356, 430, 365),
    "reviewer_name": (65, 356, 430, 365),
    "handler_name": (65, 356, 430, 365),
    "item_name": (27, 161, 591, 171),
    "item_tax_rate": (27, 161, 591, 171),
    "item_price": (27, 161, 591, 171),
    "item_tax": (27, 161, 591, 171),
    "remark": (365, 294, 590, 345),
}
